<?php

class PageCompositionView {

	public function BuildPage(\Page $a_menu, \Page $a_controller, $addHTMLString, \Page $a_shoppingCart) {
		$ret = new \Page();

		//bygg sidans titel
		$ret -> m_title = $a_controller -> m_title . " | " . $a_menu -> m_title;

		$ret -> m_body = "
                
                <div>
                        <div id='addStyle'>
                                $addHTMLString
                        </div>
                        
                        <div id='menuStyle'>
                                $a_menu->m_body
                        </div>
                        <div id='controllerOutput'>
                                $a_controller->m_body
                        </div>
                        <div id='cart'>
                                $a_shoppingCart->m_body
                        </div>
                        
                </div>
                ";

		return $ret;
	}
}
